package com.neusoft.yuejian26.yuejian_26.model;

import com.neusoft.yuejian26.yuejian_26.Service.LoginService;
import com.neusoft.yuejian26.yuejian_26.Service.RegService;
import com.neusoft.yuejian26.yuejian_26.Service.UpLoadService;
import com.neusoft.yuejian26.yuejian_26.Service.UpdateUserService;
import com.neusoft.yuejian26.yuejian_26.Service.UserService;
import com.neusoft.yuejian26.yuejian_26.network.RetrofitBaseModel;

import okhttp3.MultipartBody;
import retrofit2.Call;

/**
 * Created by Administrator on 2017/10/19 0019.
 */

public class UserModel extends RetrofitBaseModel {
    public Call userLogin(String phone,String password){
        return retrofitCallBuilder.buildCall(LoginService.class,"checkuser",new Object[]{phone,password});
    }

    public Call userRegister(String name,String tel,String upwd){
        return  retrofitCallBuilder.buildCall(RegService.class,"doingReg",new Object[]{name,tel,upwd});
    }

    public Call userIntro(String uid){
        return  retrofitCallBuilder.buildCall(UserService.class,"getUserIntro",new Object[]{uid});
    }
    public Call checkName(String uname){
        return  retrofitCallBuilder.buildCall(RegService.class,"checkName",new Object[]{uname});
    }
    public Call upLoadPic(String uid, MultipartBody.Part file){
        return  retrofitCallBuilder.buildCall(UpLoadService.class,"upload",new Object[]{uid,file});
    }
    public Call updateUserIntro(String uid,String uname,String utel){
        return  retrofitCallBuilder.buildCall(UpdateUserService.class,"updateUserIntro",new Object[]{uid,uname,utel});
    }
}
